package com.system.service.impl;

import com.system.mapper.UserMapper;
import com.system.pojo.administrator;
import com.system.pojo.ownerinfo;
import com.system.service.UserService;
import com.system.utils.Md5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public ownerinfo findByUserName(String name) {
       ownerinfo u= userMapper.finByUserName(name);
       return u;
    }

    @Override
    public void register(String name, String password) {
        String md5String= Md5Util.getMD5String(password);
        userMapper.add(name,md5String);
    }
}
